package com.ambow.service.impl;

import java.util.List;

import com.ambow.dao.ManagerDao;
import com.ambow.dao.impl.ManagerDaoImpl;
import com.ambow.entity.Message;
import com.ambow.entity.News;
import com.ambow.entity.Product;
import com.ambow.entity.User;
import com.ambow.service.ManagerService;
import com.ambow.utils.PageResults;

public class ManagerServiceImpl implements ManagerService {
ManagerDao md=new ManagerDaoImpl();
	@Override
	public List<User> selectAllUser() {
		return this.md.selectAllUser();
	}
	@Override
	public List<Product> selectAllProduct() {
		return this.md.selectAllProduct();
	}
	@Override
	public boolean delete_modifyProduct(Product pro) {
		return this.md.delete_modifyProduct(pro);
	}
	@Override
	public Product queryOneProduct(int id) {
		return this.md.queryOneProduct(id);
	}
	@Override
	public List<Product> queryProduct(String hql, String[] param) {
		return this.md.queryProduct(hql, param);
	}
	@Override
	public boolean addProduct(Product pro) {
		return this.md.addProduct(pro);
	}
	@Override
	public User queryOneUser(int id) {
		return this.md.queryOneUser(id);
	}
	@Override
	public boolean delete_modifyUser(User user) {
		return  this.md.delete_modifyUser(user);
	}
	@Override
	public List<News> queryAllNews(String hql) {
		return this.md.queryAllNews(hql);
	}
	@Override
	public boolean addNews(News news) {
		return this.md.addNews(news);
	}
	@Override
	public boolean updateStatus(News news) {
		return this.md.updateStatus(news);
	}
	@Override
	public News queryOneNews(Integer id) {	
		return this.md.queryOneNews(id);
	}
	
	@Override
	public boolean updateMessageStatus(Message message) {
		return this.md.updateMessageStatus(message);
	}
	@Override
	public Message queryOneMessage(Integer id) {
		return this.md.queryOneMessage(id);
	}
	@Override
	public List<Message> queryAllMessage(String hql) {
		return this.md.queryAllMessage(hql);
	}
	@Override
	public PageResults<User> getPageByFetchedHql(String hql, String countHql, int i, int j) {
		return this.md.getPageByFetchedHql(hql,countHql,i,j);
		
		
	}

	
	
	
}
